import { DYNAMIC_LOAD } from '../../internal'

// 动态加载图元模块,识别图元可以显示的属性
function DynamicLoad(type) {
  try {
    const _module = require('@/vng/property/datas/entity/' + type + '.js')
      .default
    return DYNAMIC_LOAD(_module)
  } catch (err) {
    return { props: null, factory: null }
  }
}

export default DynamicLoad
